package main

import (
	"fmt"
	"github.com/gogf/gf/v2/util/gconv"
	"io/ioutil"
	"net/http"
	"time"
	"yunAIYI_nginxUpdate/app/util"
)

func main() {
	t3()
}
func t4() {
	httpapi_port := gconv.String(util.GetPort_server())
	print(httpapi_port)
}
func t3() {
	fmt.Println(util.GetThisServerIP())
}

func timeaa() {
	a := time.Now()

	b := a.Add(time.Millisecond)
	fmt.Println(a, b)
}
func login() string {
	url := "http://192.168.0.1/router/interface_status_show.cgi"
	client := &http.Client{}
	req, err := http.NewRequest("POST", url, nil)
	if err != nil {
		fmt.Println("获取地址错误")
	}
	req.Header.Set("Cookie", `__guid=224789850.346329641996463600.1583585485503.16; __DC_gid=224789850.565324479.1583585485504.1586937598450.36; Qihoo_360_login=831701798dddee1f49ff1a56d5ea6762`)

	resp, err := client.Do(req)
	if err != nil {
		fmt.Println("登录错误")
	}
	resp_byte, err := ioutil.ReadAll(resp.Body)
	defer resp.Body.Close()
	respHtml := string(resp_byte)
	return respHtml
}
